<?php
include( "gConfig.php" );

$room = $_GET['room'];
$uid = $_GET['uid'];
if(isset($uid)){
	checkuid($uid,5);
}else {
	exit();
}
$query = "select * from m_state where sId=${room} ";
$result = mysql_query($query,$comm);
$line = 0;
echo "{";
$row = mysql_fetch_row($result);
$games = explode("|", $row[9]);
$BPs = explode("@", $games[0]);
echo "
	\"sId\":\"{$row[0]}\",
	\"sState\":\"{$row[1]}\",
	\"sRound\":\"{$row[2]}\",
	\"sSec\":\"{$row[3]}\",
	\"sCount\":\"{$row[4]}\",
	\"sBets\":\"{$row[5]}\",
	\"sWin\":\"{$row[6]}\",
	\"sResult\":\"{$row[7]}\",
	\"sUpdate\":\"{$row[8]}\",
	\"B\":\"{$BPs[0]}\",
	\"P\":\"{$BPs[1]}\",
	\"BP\":\"{$BPs[2]}\",
	\"games\":\"{$games[1]}\"
	";
echo "}";
?>